<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

{config_load file="product_info.conf"}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language->getLanguage()}" dir="{$language->getDirection()}">
	<head>
		{include file=$theme->getTemplateUrl("head_common.tpl")}
		<title>{#PAGE_TITLE#}</title>
	</head>
	
	<body>
		{include file=$theme->getTemplateUrl("body_start.tpl")}
		
		<h2>{$product->getName()}</h2>
		
		<p>{$product->getDescription()}</p>
		
		{if $product->canBePurchased()}
			<form action="{$smarty.const.FILENAME_SHOPPING_CART}?action=add" method="post">
				{if $product->hasOptions()}
					<h3>{#HEADING_PRODUCT_OPTIONS#}</h3>
					{foreach item="group" from=$product->getOptionGroups()}
						{foreach name="options" item="option" from=$group->getOptions()}
							{if $smarty.foreach.options.first}
					<p>
						<label for="" class="columnar">{$group->getName()}</label>
						<select name="id[{$group->getId()}]">
							{/if}
							{strip}
							<option value="{$option->getId()}">{$option->getName()}
							{if $option->getValue() != 0}
								&nbsp;({$option->getValueFormatted()})
							{/if}
							</option>
							{/strip}
							{if $smarty.foreach.options.last}
						</select>
					</p>
							{/if}
						{/foreach}
					{/foreach}
				{/if}
				<input type="hidden" name="products_id" value="{$product->getId()}" />
				<input type="text" name="quantity" value="1" size="2" />
				@ {$product->getPrice()}
				<input type="submit" name="add_to_cart" value="Add to cart" />
			</form>
		{/if}
		
		{include file=$theme->getTemplateUrl("body_end.tpl")}
	</body>
</html>
